<%=javascript_include_tag "prototype"%>

<label for = "walk location">*Locations:</label><br />
<%= select(:walks, :id, Greatwalk.find_available_locations,
          {:prompt=>'Select Great Walk Location'}, :selected => nil) %>
<%= observe_field("walks_id", :url => {:controller => "user", :action => "update_campsites"},
		           :update => "campsites_list", :with => "id")%>
<div>
<%=error_messages_for 'carts'%>
<%form_tag :action => :add_to_cart do%>
	<table>
		<tr>
			<td>
				<div id ="campsites_list" >
   					<label for = "camp location">*Campgrounds:</label><br />
			   		<%= select_tag "campsite", %w{ ------- }, :class => "select_campsites" %>
				</div>	
			</td>
			<td>
				<label for = "arrival date">*Arrival Date:</label><br />
				<%= text_field_tag :arrival_date, params[:arrival_date], :size => 10 %>		
			</td>
			<td>
				<label for = "nights">*Nights:</label><br />
				<%= text_field_tag :nights, params[:nights], :size => 10 %>			
			</td>
			<td>
				<label for = "adults">*Adults:</label><br />
				<%= text_field_tag :adults, params[:adults], :size => 10 %>		
			</td>
			<td>
				<label for = "children">Children:</label><br />
				<%= text_field_tag :children, params[:children], :size => 10 %>			
			</td>
			<td align = "center">
				<label for = "family claim">Claim Family Rate:</label><br />
				<%= check_box_tag "family_claim", "1", false%>
			</td>
			<td><br />
				<%=submit_tag "Add to cart"%>
			</td>
		</tr>		
	</table>
<%end%>
<%= submit_tag "Select next campground", :onclick => "if($('camp_id').length - 1 > 
											$('camp_id').selectedIndex) 
											$('camp_id').selectedIndex++; 
											return false;" %>
</div>